package com.warren.demo.service.impl;

import com.warren.demo.dao.UserDao;
import com.warren.demo.entity.Role;
import com.warren.demo.entity.RoleUser;
import com.warren.demo.entity.User;
import com.warren.demo.entity.UserRole;
import com.warren.demo.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserDao userDao;

    @Override
    public List<User> queryAll() {
        List<User> list = this.userDao.findAll();
        return list;
    }

    @Override
    public List<Role> queryRole() {
        List<Role> list = this.userDao.queryRole();
        return list;
    }

    @Override
    public List<UserRole> queryUserRole() {
        List<UserRole> list = this.userDao.queryUserRole();
        return list;
    }

    @Override
    public List<RoleUser> queryRoleUser() {
        List<RoleUser> list = this.userDao.queryRoleUser();
        return list;
    }
}
